<?php
if (!defined('IN_ADMIN')) {
    exit('Access Denied');
}

// 判断请求是否有效
$param = array(
        'do' => 'getAdminUser',
        'format' => 'json',
        'adminUid' => $_SESSION['user']['adminUid'],
);

$content  = get_api_content($_SC ['apiurl'], $param);
$content = json_decode($content);
if ($content->errorNo){
    $msg = "账号失效或无此管理员，请重新登录!";
	$msg .= "errorNo:" . $content->errorNo;
	cpmessage($msg, "http://manage.ffrj.net/admin.php");
	exit;
}

$mpurl = 'admin.php?ac=autoreply';
$op = strval($_GET['op']);
$ops= array('topic', 'diary');
$index = 0;
foreach ($ops as $i=>$v) {
	if ($v == $op) {
		$index = $i;
		break;
	}
}

$index ++;
$session = session_id();
$adminUid  = $_SESSION['user']['adminUid'];